package e2q.portal.domain.uPortal;

import javax.persistence.Column;

/**
 * UpGroupMembershipId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class UpGroupMembershipId implements java.io.Serializable {

	// Fields
	@Column(name = "GROUP_ID")
	private String groupId;
	@Column(name = "MEMBER_SERVICE")
	private String memberService;
	@Column(name = "MEMBER_KEY")
	private String memberKey;
	@Column(name = "MEMBER_IS_GROUP")
	private String memberIsGroup;

	// Constructors

	/** default constructor */
	public UpGroupMembershipId() {
	}

	/** full constructor */
	public UpGroupMembershipId(String groupId, String memberService,
			String memberKey, String memberIsGroup) {
		this.groupId = groupId;
		this.memberService = memberService;
		this.memberKey = memberKey;
		this.memberIsGroup = memberIsGroup;
	}

	// Property accessors

	public String getGroupId() {
		return this.groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getMemberService() {
		return this.memberService;
	}

	public void setMemberService(String memberService) {
		this.memberService = memberService;
	}

	public String getMemberKey() {
		return this.memberKey;
	}

	public void setMemberKey(String memberKey) {
		this.memberKey = memberKey;
	}

	public String getMemberIsGroup() {
		return this.memberIsGroup;
	}

	public void setMemberIsGroup(String memberIsGroup) {
		this.memberIsGroup = memberIsGroup;
	}

	@Override
	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UpGroupMembershipId))
			return false;
		UpGroupMembershipId castOther = (UpGroupMembershipId) other;

		return ((this.getGroupId() == castOther.getGroupId()) || (this
				.getGroupId() != null
				&& castOther.getGroupId() != null && this.getGroupId().equals(
				castOther.getGroupId())))
				&& ((this.getMemberService() == castOther.getMemberService()) || (this
						.getMemberService() != null
						&& castOther.getMemberService() != null && this
						.getMemberService()
						.equals(castOther.getMemberService())))
				&& ((this.getMemberKey() == castOther.getMemberKey()) || (this
						.getMemberKey() != null
						&& castOther.getMemberKey() != null && this
						.getMemberKey().equals(castOther.getMemberKey())))
				&& ((this.getMemberIsGroup() == castOther.getMemberIsGroup()) || (this
						.getMemberIsGroup() != null
						&& castOther.getMemberIsGroup() != null && this
						.getMemberIsGroup()
						.equals(castOther.getMemberIsGroup())));
	}

	@Override
	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getGroupId() == null ? 0 : this.getGroupId().hashCode());
		result = 37
				* result
				+ (getMemberService() == null ? 0 : this.getMemberService()
						.hashCode());
		result = 37 * result
				+ (getMemberKey() == null ? 0 : this.getMemberKey().hashCode());
		result = 37
				* result
				+ (getMemberIsGroup() == null ? 0 : this.getMemberIsGroup()
						.hashCode());
		return result;
	}

}